Skip to main content

Full text of "Prototyping a Wireless Sensor Node using FPGA for Mines Safety Application"

See other formats


ACEEE Int. J. on Electrical and Power Engineering, Vol. 02, No. 02, August 201 1 



Prototyping a Wireless Sensor Node using FPGA for 

Mines Safety Application 

Manoranjan Dasl, Banoj Kumar Panda2 

Konark Institute of Science and Technology, Bhubaneswar, India 

{ lmrdasbiet@gmail.com, 2bk_panda2001 @yahoo.com} 



Abstract — The sensor nodes in a wireless sensor network are 
normally microcontroller based which are having limited 
computational capability related to various applications. This 
paper describes the selection, specification and realization of 
a wireless sensor node using the field programmable gate 
array (FPGA) based architecture for an early detection of 
hazards (e.g fire and gas-leak ) in mines area. The FPGAs in 
it's place are more efficient for complex computations in 
compare to microcontrollers, which is tested by implementing 
the adaptive algorithm for removing the noise in sensor 
received data in our work. Another advantage of using FPGA 
is also due to it's reconfigurable feature without changing 
the hardware itself. The node is implemented using cyclone 
n FPGA device present in Altera dE2 board .In this work the 
network comprises of 4 nodes out of which 2 are test nodes, 
one routing node and one base station node. An energy 
efficient MAC protocol is tested for transmitting the data from 
test node to base station node. 

Key Words — Wireless Sensor Network (WSN), system on 
programmable chip (SOPC), FPGA. 



I. Introduction 

The hazards happened due to un-natural gas leak and fire 
in a mines area raised an issue for the safety of people working 
in mines area, which is at a far location from a public place. 
However deploying a no. of sensor nodes in the mine area to 
make an early detect of information related to these hazardous 
environment and transferring the information to rescue center 
may avoid the drastic situation. This is possible if at all the 
deployed sensor nodes become a member of Wireless Sensor 
Network [1]. The ongoing research on communication 
networks made it possible to use wireless sensor network for 
variety of applications like fire detection, wildlife habitat 
monitoring, target tracking, intrusion detection. Also the 
development in networking technology makes the sensor 
nodes to form an ad-hoc network through their own 
contribution. The only limitation in this network is that the 
base station node is fixed. Other nodes can act as source as 
well as routing nodes [2] [3]. Each node is composed 
principally of one or several sensors, a processing unit and a 
module of communication, etc. These nodes communicate 
between each other according to the network topology and 
the existence or not of an infrastructure to forward the 
information to a control unit outside the zone of measure. All 
these features enable us to imagine an adaptive complex 
system built around several sensors in a wireless 
communication system. As far as the signal processing is 
concerned it is desired that an error/noise free data must be 
received at the final destination. To achieve this one of the 

©2011 ACEEE 
DOI:01.DEPE02.02.157 



adaptive algorithm can be implemented in the processing 
unit itself. This requires a complex computational energy 
efficient processing unit, which is difficult to get in classical 
architecture based processing unit. Also the microcontrollers 
show poor energy efficiency in many complex computational 
cases. The ASICs on the other hand are more energy efficient 
but are less flexible since they are application specific. This 
can be compensated with the use of a reconfigurable 
architecture based processing unit (i.e. FPGA) . In this paper, 
we have used the FPGA based sensor node architecture, 
featuring the acquisition of data related to fire (i.e. 
temperature) and smoke and transmission of information by 
routing over high data rate wireless networks such as 
bluetooth. Our goal is to detect and predict mines hazard 
promptly and accurately in order to rescue the people working 
in mines area. The data is transmitted from test node to base 
station satisfying the energy efficient MAC protocol 
reducing the loss of information. The remainder of this paper 
is organized as follows. Section II presents theory related to 
the network structure we used for the problem and the 
selection criteria in choosing a node. Section III focuses on 
the functional architecture of node .The last section discusses 
implementation details. The paper ends with a conclusion 
and the work which is being done in the near future at our 
laboratory. 

H. SENSOR NETWORK ARCHITECTURE 

This section is further divided into two sub-sections. In 
the first subsection, the network structure is discussed are 
discussed. Second subsection gives the selection criteria of 
a wireless sensor node. 

A. Planned Network Structure 

In our experimented network, sensor nodes collect 
measurement data such as temperature and density of smoke 
as the parameter required for determining the mines hazard 
rate. The proposed sensor network paradigm is shown in 
Fig.l. 

o ° o o « ° " 

° C * ° » „ O c ° ° * 

* * ' • • - o • «' 






° . *- 



V 

?1N 



a o g, 

o o o 

° <f O [J 

o o 



25 



9 Slri 
Figure 1. A wireless sensor network for mines fire detection 



fcACEEE 



ACEEE Int. J. on Electrical and Power Engineering, Vol. 02, No. 02, August 201 1 



As seems in fig. 1 a large number of sensor nodes are densely 
deployed in the proposed mines area. These sensor nodes 
are organized into clusters so that each node has a 
corresponding cluster header. Sensor nodes can measure 
environment temperature. Every sensor node is capable of 
removing the noise in the data received and comparing with 
a standard data through a means of mathematical computation 
based on certain algorithms (like LMS). After making the 
required computation the information is sent to the base 
station through the corresponding cluster head. The base 
station after receiving the measured data related to sensor 
nodes can able to know the early information of fire. 

B. Selection Criteria of Wireless Sensor Node 

Firstly, the back bone of a wireless sensor network should 
be flexible, scalable, and interfaceable to analog- and digital- 
based sensors, removable storage and wireless. Secondly, a 
high degree of functionality is required to process sensor 
information at source to reduce the noise in the data due to 
environmental condition and sending the data when needed 
(i.e. deviation from a standard data base). This speeds 
communication by freeing bandwidth over the communication 
media and saves power to enhance the lifetime of the sensor 
node. In a conventional 8-bit MICA motes though the 
computations are possible, multiple computations take a long 
time. However in FPGA multiple computations can be 
completed within a very short time thereby we chose an FPGA 
[4] as the solution for the above requirements. To add more, 
the modules should be robust in order to able to be connected 
and disconnected from each other multiple times to allow 
experimentation. They should also be times to allow 
experimentation. They should also be able to withstand harsh 
conditions such as strong vibration when deployed in mobile 
sensing applications. A FPGA perfectly supports all the above 
requirements. To add more points to justify the selection of 
the node as FPGA its reconfigurabilty feature can be 
discussed. Despite advances in fabrication technologies, 
sensors generally exhibit imperfections (i.e. offset, drift, non- 
linearity and noise imperfections) and the magnitude of these 
imperfections is found to vary both from sensor to sensor 
and with time. Moreover, during operation, as with any other 
system component, sensors may develop several types of 
faults and fail in a variety of ways. If conventional motes are 
used then it would be very expensive and also very 
complicated to implement multiple sensor validation. So the 
solution is to introduce a reconfigurable digital system. Hence 
the solution might be a self-reconfigurable approach for 
providing a flexible connectionism at very low resource cost 
by partially reconfiguring the FPGAs (e.g. Cyclone-II). 

ni. Proposed Node Architecture and Design 

The functional architecture and the experimental platform, 
is built upon the kit of development ALTERA SOPC (System 
One Programmable Chip). It is composed essentially by four 
units an acquisition unit, a treatment unit, a routing unit and 
a radio interface/communication unit. A basic block diagram 
is given below (Fig. 2). 

©2011 ACEEE 
DOI:01.DEPE02.02.157 



Se uncus 



Acqumilitin. t Treatment 



l"itit 



Unil 



limiting 

Unit 



<'[iniiiiunit.ilwin 

* Inif 



Figure 2. Block Diagram 

The detail block diagram for experimental set up is shown in 
fig-3. 





Acquisition unit 






Scrwr & SCC 











<'rintmi»nic4Ui»n unit 



RF module 



Mil- MSI i'; 



ADC Interface 

;fcjip»H5ioi Header) 

PIO 



rz 



R S 2J2 



SD RAM :' 
SRAM 



1. ART 



On chip 
Memory 



KuL Memory 
Interface 



Hunting I nil 
(h-nlftnL) 



] riMtniL-iiC L'nil 

Nios I] 

32 bit HIM' |ir<icc»ur 

t 



P s u 



Figure 3. Block Diagram of experimental set up for the node 

RFU: Reconfigurable functional unit 
PSU: Power supply unit 

A. Acquisition Unit 

The temperature data acquisition is done by connecting 
a temperature sensor and the dense of smoke is detected by 
using smoke detector. The outputs of both of these sensors 
are given to their corresponding signal conditioning circuits, 
whose outputs are again given to ADC. The output of ADC 
is fed to the Altera DE2 board (FPGA kit) via the expansion 
header PIO available in the board itself. Periodically, the real- 
time temperature data and the data related to density of smoke 
due to fire is acquired by the corresponding sensors and 
given to the treatment unit. 

B. Treatment Unit 

The sensor data acquired is processed in the treatment 
unit, where the noise in the acquired data (if any) is cancelled 
and compared with a pre-chosen threshold value. If the value 
obtained is greater than threshold, then the data is sent to 
the base station through cluster head. 

C. Routing Unit 

The function of the routing unit in our experiment is to 
implement the basic medium access control (MAC) protocol 
and transmit the required data as decided by the treatment 
unit following an energy efficient routing protocol in wireless 
network. The MAC protocol is especially important in a 
shared medium like the air, since multiple nodes transmitting 
at the same time will interfere each other's communication. 
Since a network contains multiple independent nodes, an 
agreement is needed for medium access control. This 
agreement should be shared by all nodes in the network. 
Thus MAC protocol determines which node may access the 
medium at what time for sending its data to the base station 



26 



^ACEEE 



ACEEE Int. J. on Electrical and Power Engineering, Vol. 02, No. 02, August 201 1 



through routing nodes(if any)in its path to the base station. 
In a wireless environment, the MAC protocol determines the 
state of the radio on a node sending, receiving, or sleeping. 
Since the radio, while listening or transmitting, uses relatively 
much energy, the MAC is a good place to save energy. A 
MAC protocol for wireless sensor networks should focus on 
energy usage, and ensure that radios are in sleep mode as 
much as possible. Important attributes of MAC Protocol to 
be taken care are like collision avoidance, energy efficiency, 
latency, throughput and scalability in node density in a 
network. 

/. S-MAC Protocol Design 

The main goal in our MAC protocol design is to reduce 
energy consumption, while supporting good scalability and 
collision avoidance [6] [7] . Our protocol tries to reduce energy 
consumption from all the sources that we have identified to 
cause energy waste, i.e., idle listening, collision, overhearing 
and control overhead. To achieve the design goal, we have 
developed the S-MAC (Sensor MAC) that consists of three 
major components: periodic listen and sleep, collision 
avoidance, and message passing. 

//. Routing Protocol 

We have used the Bellman Ford protocol as our routing 
algorithm. Here, multi-hop mechanism is used in order to route 
the data to the base station. Each node is assigned a node 
number and also a value is dynamically obtained based on 
the layer in which it is present which we call as the hop- 
count. The node with hop-count 'n' transmits its data to 
node with hop-count 'n-1' and this continues till the data 
reaches the node with hop-count '0' which is the base station. 

D. Communication Unit 

Bluetooth technology is a high data rate, low power 
consumption, low cost wireless networking protocol targeted 
towards automation and remote control applications. 
Bluetooth is expected to provide low cost and low power 
connectivity for equipment that needs battery life as long as 
several days with a high data transfer rate. The comparison 
between Bluetooth with WLan technologies is given in the 
TABLE I. 

Bluetooth devices can be programmed in C/C++, 
sometimes require assembly language for particular time- or 
space -critical components. Because bluetooth devices use 
well-established microcontrollers, there are a number of 
development tools available. Hence a large amount of data 
can be sent to a long distance within a small time using 
bluetooth technology. Low-power consumption is based as 
much on a low-duty cycle as it is on the low-power nature of 
the 802. 15. 1 radios. Bluetooth wireless range (10-100 meters) 
is adequate for many applications related to WSN. 



BLUETOOTH 



TABLE I 

VS WIRELESS LAN 



TECHNOLOGIES 



Parameter/ 
Technique 


EEEB02.11b& 
B02.1Ii 


Bluetooth 


Frequency 
Band and 
Bandwidth 




2.4 GHz 


IEEE B02. lib 

- 2.4 GHz 
IEEEB02.ll! 

- 5 GHz 
IEEEB02.11g 
- 2.4 GHz 


Speed 


11 Mbps - 54 
Mbps (Effective 
speed - half of rated 
speed) 


1-2 Mbps (Effective 
speed -less than 50% 
rated speed) 


Modulation 
Technique 




GFSK 


Spread Spectrum 
OFDM 


Distance 
Coverage 




Up to 30 feet now- 
efforts tD increase 
coverage and speed 


Up to 300 feet - 
B02.11b 

Up tD 60 feet - 
S02.Ha 


No. of access 

points 

required 


Every 200 feet - 
B02.11b 
Every 50 feet - 
802.11a 


Every30feet-25to30 
times number of 
Bluetooth access 
p Dints 


CDSt 


Much more 
expensive than 
Bluetooth 


Bluetooth chips are 
available at less than 
$5 



In this work we have used the PTR4500 Bluetooth module 
(RF module) as the communication unit, whose typical 
features are as shown in the TABLE II. 

TABLE II 
PTR4500 DETAILS 



PirjMtir 


VibK 


FMflUHltV 


24TOMHS-15271JH! 


CtumuJ 


115 


MoMtfioD 


GFSK 


Jfajman RF dui me 


Lllbps 


RS'2;2 sniil port fan ms 


JWbps, llsiWbps 


SnppN'Yoltage 


DCoMOV 


Cinrou 


Kttag 


KjEa< [U>S, nftaplimiii 


W-VOaji^il 



The block diagram for communication between sensor node 
and base cluster head node is shown in fig. 4. 



©2011 ACEEE 
DOI:01.DEPE02.02.157 



27 



ACEEE 



ACEEE Int. J. on Electrical and Power Engineering, Vol. 02, No. 02, August 201 1 



£ 



ta't 

1 


SlSWl 


nswi . 

Mi 






Figure 4. Communication between sensor node and cluster head 
node 

The prototype of interfacing of bluetooth module with 
Altera DE2 board using RS 232 is shown in fig. 5. 



VI 


LL.J g; 



Figure 5. Interfacing FPGA with Bluetooth module 
IV. HARDWARE IMPLEMENTATION 

The node in the experimented sensor network is realized 
using Altera DE2 board. The node uses NIOS II soft core 
processor as a part of FPGA device to act as the processor in 
the treatment unit of the said node architecture. The FPGA 
uses SRAM cells to store configuration data related to 
architecture. The system configuration is carried out using 
the SOPC builder tool. Apart of the SOPC builder is shown in 
fig.6.The Quartus II software automatically generates VHDL 
or BDF file related to the system configuration so as to be 
used while execution. For testing of the configured system 
using FPGA through a PC, the device is configured in passive 
configuration mode- JTAG (Joint test action group) mode. 
The Quartus II software generates .sof files that can be 
downloaded using USB Blaster Cable for JTAG configuration. 



Bend 


■i.-. 


DsrtfcirBrtEoH-il.CifCowtlPI I2T v 








■ V'l'l-* 


pMCbC 



VXi WW. 



Js£ 



D 



U:c 






S 







3 cpn_D 

—4 ira4(udtf:F_-THi!d iVkIt perl 
^~< diii-jTSTB" Urirle- - perl 

|Fpndhifi 



fcscitftn CM 



9se Bid 



TpttCKpWmr^fl . cl 



Fu'JI 



raj 



«!«■>■« n.nrrnr'T'" 



Figure 6. SOPC builder showing the presence of NIOS processor 
and memory 

©2011 ACEEE 
DOI:01.JJEPE.02.02.157 



After the configuration is being over necessary peripheral 
interfacing (such as acquisition unit & communication unit) 
is made and tested. For perfect operation of interfacing related 
IP cores must to be included to the configuration data (e.g. 
ADC interface through PIO core & UART core for interfacing 
the RF module as suggested in fig. 3 ).The block diagram for 
the practical temperature sensor interface is shown in fig. 7. 

maim 






D 


f 


1* 


P 


r 


mti 


1 


t 




Q 


j 



Figure 7. Sensor interface system 

After the successful interfacing of ADC and blue tooth 
module to the FPGA kit the sensor data is read from ADC 
output, through the NIOS II processor using the necessary 
C/C++ commands. The received data is processed through 
the noise canceller designed using the logic cells of FPGA. 
The noise caneceller functions as per the adaptive algorithm 
(LMS) written in VHDL whose corresponding block schematic 
is shown in fig. 8. Then the data is compared with the pre- 
defined threshold value, and if found greater, then transmitted 
using the routing and MAC protocol. The last phase of the 
implementation includes the testing of protocols (.i.e. Routing 
& MAC) as a function of routing unit as suggested in fig. 3. 
Once the configuration and testing is over, the proposed 
nodes deployed to the network for practical application. 



Ims 



elk 

xjn[w1-1..0] 

djn(w1-1.i>] 



e_outlutf-1,.0] 

y_out[itf2-1.0) 

fD_out[wM..O) 

11 .out [w M. .0) 



ir.-t 



Figure 8. Block schematic of adaptive noise canceller 

V RESULTS AND DISCUSSION 

In a WSN based application it is well known that the 
nodes are limited in energy (i.e. Battery powered). Thus it is 
required that the node should spare a small amount of energy 
out of it's total available energy for it's computational as well 
as transmission/reception job. In fact the energy consumed 
is very less in computation as compared to transmission/ 
reception. Hence in our experiment we have focused more on 



28 



-fcACEEE 



ACEEE Int. J. on Electrical and Power Engineering, Vol. 02, No. 02, August 201 1 



decreasing the transmission/reception energy. We achieved 
this following the two processes pointed below, 
(i) To reduce the transmission energy the data received from 
sensors are transmitted only in case there is a considerable 
amount of change with respect to the base data not always, 
(ii) Energy efficient protocols are used for the transmission 
of data form the node to the base station using the shortest 
path. 

In our first part of the experiment the sensor data is 
acquired for different temperatures and the temperature 
values are verified with a standard temperature measuring 
device (thermometer). The data acquired is as given in the 
TABLE III. 

TABLE III 

ADC OUTPUT FOR DIFFERENT TEMPERATURES 



Sensor I'P 
(Temp erature in = C) 


Output of SCC 
(in Volt) 


Output of ADC 
(in Hex) 


25 


1 13 


5A 


2B 


130 


5C 


30 


1.35 


5D 


32 


1.45 


5F 


34 


153 


61 



Next to the temperature data acquisition, the smoke on the 
basis of different densities are sensed through the smoke 
detector and tested for acceptance through human nose. The 
data acquired is as given in the TABLE IV. 

TABLE IV 

ADC OUTPUT FOR DIFFERENT DENSE SMOKES 



Sensor LP 


Output of SCC 
(in Volt) 


Output o f ADC 
(in Hex) 


No Sffiotr 


0.03 


00 


Loiv dens? smoke 


1.15 


SA 


Moderate dense smoke 


140 


5E 


Hieh dense smoke 


1.75 


73 



The data read by NIOS II form ADC for 25 samples for a 
period of one hour is shown in fig. 9. 




Figure 9. Data read by NIOS II 

©2011 ACEEE 
DOI:01.DEPE02.02.157 



To have accuracy both the sensor datas are received 
alternatively and sent to the noise canceller up to 25 values. 
The VHDL simulated output of the noise canceller in .vwf 
form is shown below in fig. 10. 



CiWKtfU Hn' i ir i H li J W t"i |l— Atwbfvl SvWVTnm] 



iU i 



a/*^ ; 'fiTjOi* 




Figure 10. Simulated output of Adaptive noise canceller 

The average of 25 values is calcuted in the NIOS II processor. 
The average is compared with the threshold value (i.e. 55 in 
our experiment), if found greater then transmitted. In the 
simillar fashion the smoke density data has been transmitted. 
The simulated output shown in fig. 1 1 indicates the receiving 
of data from nodes by the base station node through the 
routing node. In our experiment we have considered 4 nodes 
with address through 3(node being the base station, node 
1 being the routing node, node 2 and 3 being the station 
node). For the efficient use of MAC when one node starts 
transmitting the data other sensing node remains in sleep 
mode. 




UJj 



,i_ — mUlisq- 



^r 



Figure 1 1 . Data received by base station node 

Since the application is WSN based, it is also important to 
consider energy efficiency of individual nodes as far as the 
life of the node is considered for a long period. Hence we 
have transmitted the average temperature value to the base 
station by using energy efficient protocol (LEACH). The 
energy consumption or energy saving due to compression 
for a node is taken into consideration as our second 
experiment. The energy consumption details are taken from 
LEACH (Low Energy Adaptive Cluster Hierarchy) [8]. The 
details are given in TABLE V. 



29 



^VACEEE 



ACEEE Int. J. on Electrical and Power Engineering, Vol. 02, No. 02, August 201 1 



TABLE V 
Energy Consumption Details 



Operation 


Energy 

Dissipated 


Transmitter Electronics fEr, - -■„ ) 
Receiver Electronics (Ek-ti^} 

(Eft -^c= Elir - iltt = Eilc ) 


50 nJ/bit 


Transmitter Amplifier (E„^ ) 


100 pJ/bit/m* 



The approximate energy consumption details based on the 
theoretical values has been computed for transmission of 8- 
bit data and shown in TABLE VI. 

TABLE VI 

Approximate energy consumption details 



No. of bits 


Approx. Energy 

consumed -TX if 

d=10m (Inn!) 


Approx. Energy 
CDnsumed-RX TnnT) 


S 


480 


430 



CONCLUSIONS 

The data acquisition related to different temperature and 
different dense smokes is done successfully and the obtained 
data is treated using the adaptive algorithm technique. The 
functionality of nodes are well tested with a set up of 4 nodes, 
where two nodes are used to sense the data, one acts as 
routing node and another one as base station node. The data 
after computation is transmitted from the two field nodes 
with the successful testing of energy efficient MAC protocol 



(i.e. S-MAC in our test) to the base station through the routing 
node. Since each node can act as routing node shortest path 
algorithm is also used to send the data from a field node to 
base station node. Finally, since the computation is made 
(i.e. adaptive algorithm and comparison with a pre-defined 
data base) is done using the same FPGA device, the 
reconfigurable feature is partially tested. The same intelligent 
system can be extended in other high-end applications like 
driver-drowsy system, video capturing applications and so 
on. 

References 

[ 1 ] Wei Tan, Qianping Wang, Hai Huang, Yongling Guo, and Guoxia 
Zhang, "Mine Fire Detection System Based on Wireless Sensor 
Network" in Proceedings of the 2007 International Conference on 
Information Acquisition luly 9-11, 2007, Jeju City, Korea. 
[2] D. Estrin, M. Srivastava, and A. Sayeed, "Wireless Sensor 
Networks", presented at Mobicom 2002. 

[3] Soo-Hwan Choi, Byung-Kug Kim, linwoo Park, Chul-Hee Kang, 
and Doo-Seop Eom "A Survey on Sensor Networks", IEEE 
Communications Magazine, August 2002, pp 102-114. 
[4] Stephen Brown and lonathan Rose, "Architecture of FPGAs 
and CPLDs: A Tutorial", Department of Electrical and Computer 
Engineering, University of Toronto. 

[5] Anna Ha 'c "Wireless Sensor Network Designs" lohn Wiley 
& Sons Ltd, 2003, US A. 

[6] Alec Woo and David Culler, "A transmission control scheme 
for media access in sensor networks, " in Proceedings of the ACM/ 
IEEE International Conference on Mobile Computing and 
Networking, Rome, Italy, luly 2001, ACM. 
[7] Wei Ye, lohn Heidemann, and Deborah Estrin. "An Energy- 
Efficient MAC protocol for Wireless Sensor Networks", in 
Proceedings of the IEEE Infocom, pp. 1567-1576. New York, NY, 
USA, USC/Information Sciences Institute, IEEE. lune, 2002. 
[8] Wendi Rabiner Heinzelman, Anantha Chandrakasan, and Hari 
Balakrishnan," Energy-efficient communication protocols for 
wireless microsensor networks" , in proceedings of the Hawaii 
International Conference on Systems, Sciences, Ian. 2000. 



©2011 ACEEE 
DOr.Ol.DEPE.02.02.157 



30 



^ACEEE